/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bgate.screen;

import com.bgate.core.Screen;
import com.bgate.game.MainGame;
import com.bgate.utils.PiPoDesigner;
import javax.microedition.lcdui.Graphics;

/**
 *
 * @author thinhnv
 */
public class MenuScreen extends Screen {

    public MenuScreen(MainGame game) {
        super(game);
    }

    public void init() {
    }

    public void update() {
        switchScreen();
    }

    public void switchScreen() {
        switch (kindSwitchScreen) {
            case MainGame.SCREEN_MENU:
                return;
            case MainGame.SCREEN_MAINGAME:
                game.setScreen(new GameScreen((MainGame) game));
                return;
            default:
                return;
        }
    }

    public void present(Graphics g) {
        PiPoDesigner.drawCenterString(g, "Menu Screen", PiPoDesigner.COLOR_WHITE, 0, this.getWidth() / 2,
                this.getHeight() / 2);
    }

    public void pause() {
    }

    public void resume() {
    }

    public void dispose() {
    }

    public void handleSms(boolean success) {
    }

    public void upKeyPressed() {
    }

    public void downKeyPressed() {
    }

    public void rightKeyPressed() {
    }

    public void leftKeyPressed() {
    }

    public void fireKeyPressed() {
        kindSwitchScreen = MainGame.SCREEN_MAINGAME;
    }

    public void softKeyLeftPressed() {
    }

    public void softKeyRightPressed() {
    }

    public void numberKeyPressed(int keyCode) {
    }

    public void upKeyRealeased() {
    }

    public void downKeyRealeased() {
    }

    public void rightKeyRealeased() {
    }

    public void leftKeyRealeased() {
    }

    public void upKeytRepeated() {
    }

    public void downKeyRepeated() {
    }

    public void rightKeyRepeated() {
    }

    public void leftKeyRepeated() {
    }

    public void pointerPressed(int x, int y) {
    }

    public void pointerReleased(int x, int y) {
    }

    public void pointerDragged(int x, int y) {
    }

    protected void paint(Graphics g) {
    }
}
